<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
    <title></title>
    <style>
        body {
            background-color: #FFFFFF;
            margin:0;
            padding: 0;
        }
        .main {
            position: relative;
            left:0;
            top:0;
            background-color: #FFFFFF;
            width: 100%;
            height: 100%;
        }
        #demoCanvas {
            border: none;
        }
    </style>
    <script src="app/commen.js"></script>
    <script src="js/Chipmunk-js-master/cp.js"></script>
    <script src="app/phy.js"></script>
    <script src="app/ball.js"></script>
    <script>
        var game;
        function init() {
            game = new Ball({
                width:window.innerWidth,
                height:window.innerHeight,
                balls:[
                    {img:'images/ball/ball_1.png',radius:rand(),name:'颜值高'},
                    {img:'images/ball/ball_2.png',radius:rand(),name:'鬼话多'},
                    {img:'images/ball/ball_3.png',radius:rand(),name:'爱运动'},
                    {img:'images/ball/ball_4.png',radius:rand(),name:'爱跳舞'},
                    {img:'images/ball/ball_5.png',radius:rand(),name:'扮鬼脸'},
                    {img:'images/ball/ball_6.png',radius:rand(),name:'睡懒觉'},
                    {img:'images/ball/ball_7.png',radius:rand(),name:'爱唱歌'},
                    {img:'images/ball/ball_8.png',radius:rand(),name:'不想长大'}
                ],
                canvas:'gameCanvas'
            });
            game.run();

        }

        function rand() {
            return Math.round(Math.random()*20+30);
        }
    </script>
</head>
<body onload="init()">
    <canvas id="gameCanvas"></canvas>
</body>
</html>